package com.java1412.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author java1412
 * @create 2021-05-14 10:38
 */
@Configuration
public class WebMvcConfig extends WebMvcConfigurationSupport {
    @Override
    protected void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
        // 开启支持扩展名功能
        configurer.favorPathExtension(true)
                // 开启内容协商的请求参数功能，默认没有开启
                .favorParameter(true);
    }
}
